package com.minelx.statementplus.ui.form.vo;

import java.util.Objects;

public final class ProgressValue {
	private final String executionProgress;
	private final long downloadingProgress;

	public ProgressValue(String executionProgress, long downloadingProgress) {
		this.executionProgress = executionProgress;
		this.downloadingProgress = downloadingProgress;
	}

	public String executionProgress() {
		return executionProgress;
	}

	public long downloadingProgress() {
		return downloadingProgress;
	}

	@Override
	public boolean equals(Object obj) {
		if (obj == this) return true;
		if (obj == null || obj.getClass() != this.getClass()) return false;
		var that = (ProgressValue) obj;
		return Objects.equals(this.executionProgress, that.executionProgress) &&
				this.downloadingProgress == that.downloadingProgress;
	}

	@Override
	public int hashCode() {
		return Objects.hash(executionProgress, downloadingProgress);
	}

	@Override
	public String toString() {
		return "ProgressValue[" +
				"executionProgress=" + executionProgress + ", " +
				"downloadingProgress=" + downloadingProgress + ']';
	}

}
